:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-yellow: #ffd700;
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: min(90%, 800px);
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Header Styles */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.badge-yellow {
    background-color: rgba(255, 215, 0, 0.1);
    color: var(--accent-yellow);
}

.badge-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.badge-blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.badge-purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

/* Generator Panel Styles */
.generator-panel {
    background-color: var(--bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.language-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.prompt-input {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    resize: vertical;
}

.prompt-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

/* Model Select Styles */
.model-select {
    margin-bottom: 1.5rem;
}

.model-select label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.model-select select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.model-select select:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

/* Config Grid Styles */
.config-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quality-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    cursor: pointer;
}

/* Button Styles */
.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-yellow);
    color: black;
}

.btn-primary:hover {
    background-color: #e6c200;
}

.btn-secondary {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #2a2a2a;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Container */
.result-container {
    margin-top: 2rem;
}

.result-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result-wrapper img {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
}

.download-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    border-color: var(--accent-yellow);
}

/* Settings Grid Styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.setting-item select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.setting-item select:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

/* Seed Control Styles */
.seed-control {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#seedInput {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

#randomSeedBtn {
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

#randomSeedBtn:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-yellow);
}

/* Options Grid Styles */
.options-grid {
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Custom Size Styles */
.custom-size {
    margin-top: 0.5rem;
}

.custom-size.hidden {
    display: none;
}

.size-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-inputs input {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: center;
}

.size-inputs span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.size-note {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 640px) {
    .container {
        width: 95%;
        margin: 1rem auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1rem;
    }

    .generator-panel {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .checkbox-group {
        gap: 1rem;
    }
}

/* 瀑布流布局 */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 20px;
    padding: 20px;
}

/* 图片卡片样式 */
.image-card {
    position: relative;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-card .thumbnail {
    width: 100%;
    height: auto;
    display: block;
}

.model-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 14px;
    text-align: center;
}

/* 模态框样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
}

.modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-align: center;
}

/* 加载状态样式 */
.generating {
    opacity: 0.7;
    pointer-events: none;
}

/* Progress Indicator Styles */
.progress-container {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.progress-header {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.model-name {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
}

.status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status.pending {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
}

.status.pending::before {
    background: #9ca3af;
}

.status.generating {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.status.generating::before {
    background: var(--accent-blue);
    animation: pulse 1.5s infinite;
}

.status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.status.success::before {
    background: var(--accent-green);
}

.status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status.error::before {
    background: #ef4444;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
} 